diff options
| author | Sebastien Castiel <sebastien@castiel.me> | 2023-12-06 12:39:54 -0500 |
|---|---|---|
| committer | Sebastien Castiel <sebastien@castiel.me> | 2023-12-06 12:39:54 -0500 |
| commit | c72311d01a827a61d6d3d786416ddb442076d73a (patch) | |
| tree | 131861ab1df1a0cb09ed52ead5ecde8edad6e997 /src/app/groups/[groupId]/layout.tsx | |
| parent | 6c4ced0f79f801d85da5e4973ae4154f01b04dba (diff) | |
Better loading behavior
Diffstat (limited to 'src/app/groups/[groupId]/layout.tsx')
| -rw-r--r-- | src/app/groups/[groupId]/layout.tsx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/app/groups/[groupId]/layout.tsx b/src/app/groups/[groupId]/layout.tsx index f8030c6..438afea 100644 --- a/src/app/groups/[groupId]/layout.tsx +++ b/src/app/groups/[groupId]/layout.tsx @@ -15,13 +15,20 @@ export default async function GroupLayout({ if (!group) notFound() return ( - <main> + <> <div className="mb-4 flex justify-between"> <Button variant="ghost" asChild> <Link href="/groups"> <ChevronLeft className="w-4 h-4 mr-2" /> Back to recent groups </Link> </Button> + </div> + + <div className="flex justify-between items-baseline mb-4"> + <h1 className="font-bold text-2xl"> + <Link href={`/groups/${groupId}`}>{group.name}</Link> + </h1> + <Button variant="secondary" asChild> <Link href={`/groups/${groupId}/edit`}> <Edit className="w-4 h-4 mr-2" /> Edit group settings @@ -29,9 +36,7 @@ export default async function GroupLayout({ </Button> </div> - <h1 className="font-bold mb-4">{group.name}</h1> - {children} - </main> + </> ) } |
